package com.cloud.demo.Handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.demo.springcloud.entity.R;

/**
 * @author hxg
 * @version 1.0
 * @date 2022/1/14 11:15
 */
public class customerBlockHandler {
    //声明成静态类才可以通过类的对象访问或通过类名直接访问
    public static R handlerException(BlockException blockException){
        return new R(400,"globalExceptionHandler--Error1"+blockException.getClass().getCanonicalName());
    }

    public static R handlerException2(BlockException blockException){
        return new R(400,"globalExceptionHandler--Error2"+blockException.getClass().getCanonicalName());
    }
}
